Skip to content
This repository has been archived by the owner on Jun 13, 2024. It is now read-only.

Add cache_file parameter for DynamicClient #405

Closed

Conversation

alinabuzachis
Copy link
Contributor

SUMMARY
  • Add logic for cache file name generation
  • Add cache_file when DynamicClient is created

try:
client = DynamicClient(kubernetes.client.ApiClient(configuration))
client = DynamicClient(kubernetes.client.ApiClient(configuration), cache_file)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
client = DynamicClient(kubernetes.client.ApiClient(configuration), cache_file)
client = DynamicClient(kubeclient, cache_file)

Could you please add test case and changelog for this change? Thanks

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, sure. I also applied this change. Thanks.

@alinabuzachis alinabuzachis force-pushed the cache_file branch 2 times, most recently from aae4828 to 1d3f2a9 Compare March 31, 2021 12:54
@Akasurde
Copy link
Member

Akasurde commented Mar 31, 2021

@alinabuzachis I am getting this -

    cache_id = "{0}-{1}".format(configuration.host, user)
AttributeError: 'ApiClient' object has no attribute 'host'

Ok, let me try.

	* Address reviewer's comments
	* Add six in requirements.txt

Signed-off-by: Alina Buzachis <[email protected]>
@codecov
Copy link

codecov bot commented Mar 31, 2021

Codecov Report

Merging #405 (6f842f0) into main (c9157ce) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #405   +/-   ##
=======================================
  Coverage   23.17%   23.17%           
=======================================
  Files           1        1           
  Lines         151      151           
  Branches       24       24           
=======================================
  Hits           35       35           
  Misses        111      111           
  Partials        5        5           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c9157ce...6f842f0. Read the comment docs.

@alinabuzachis alinabuzachis force-pushed the cache_file branch 3 times, most recently from c6ce6cb to fe7f204 Compare March 31, 2021 13:35
Signed-off-by: Alina Buzachis <[email protected]>
@gravesm
Copy link
Member

gravesm commented Apr 14, 2021

Closing as this has been reopened in ansible-collections/kubernetes.core#46.

@gravesm gravesm closed this Apr 14, 2021
@github-actions
Copy link

github-actions bot commented Nov 4, 2021

This repository does not accept pull requests, see the README for details.

@github-actions github-actions bot locked and limited conversation to collaborators Nov 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants